package org.starsource.forum.server.transaction.impl;

import java.util.Set;

import org.starsource.forum.client.exception.CategoryNotFoundException;
import org.starsource.forum.client.exception.DatabaseException;
import org.starsource.forum.server.dao.CategoryDao;
import org.starsource.forum.server.domain.Category;
import org.starsource.forum.server.domain.User;
import org.starsource.forum.server.transaction.CategoryTransaction;

public class CategoryTransactionImpl implements CategoryTransaction {
	
	private CategoryDao categoryDao;
	public void setCategoryDao(CategoryDao categoryDao) {
		this.categoryDao = categoryDao;
	}

	@Override
	public Set<Category> getCategorySet(User requester) throws DatabaseException {
		return categoryDao.getCategorySet();
	}

	@Override
	public Category getCategory(User requester, int id) throws CategoryNotFoundException, DatabaseException {
		return categoryDao.getCategory(id);
	}

}
